// Congestion control algorithms

pub mod bbr;
pub mod brutal;

pub use bbr::BbrCongestionController;
pub use brutal::BrutalCongestionController;

use std::time::Duration;

pub trait CongestionController: Send + Sync {
    fn on_sent(&mut self, bytes: usize, now: Duration);
    fn on_ack(&mut self, bytes: usize, rtt: Duration, now: Duration);
    fn on_loss(&mut self, bytes: usize, now: Duration);
    fn can_send(&self) -> bool;
    fn bandwidth(&self) -> u64;
}
